﻿<UserControl x:Class="AzManAPI.AzManClient.UserControls.ConnectionUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:AzManAPI.AzManClient.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <conv:BoolToVisibilityConverter x:Key="B2VConverter" />
    </UserControl.Resources>
    <Grid>
        <TabControl>
            <TabItem Header="Recent">
                <StackPanel>
                    <ItemsControl>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </StackPanel>
            </TabItem>
            <TabItem Header="Open">
                <StackPanel>
                    <Border Margin="5">
                        <StackPanel>
                            <TextBlock Text="What type of store would you like to open?" />
                            <StackPanel>
                                <RadioButton>XML</RadioButton>
                                <RadioButton>Active Directory</RadioButton>
                                <RadioButton>SQL Server</RadioButton>
                            </StackPanel>
                        </StackPanel>
                    </Border>
                    <Border Margin="5">
                        <StackPanel>
                            <TextBlock Text="What is the URL of the policy?" />
                            <TextBox Text="{Binding PolicyUrl}" IsEnabled="{Binding CanModifyPolicyUrl}" />
                        </StackPanel>
                    </Border>
                    <Border Margin="5" Visibility="{Binding IsConnected, Converter={StaticResource B2VConverter}}">
                        <ComboBox ItemsSource="{Binding Applications}">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Name}" />
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>
                    </Border>
                    <Border Margin="5">
                        <Button Content="Open" Width="80" HorizontalAlignment="Right" />
                    </Border>
                </StackPanel>
            </TabItem>
            <TabItem Header="Create New">
                
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
